# Maintainer: Eric Bélanger <eric@archlinux.org>

pkgname=freeciv
pkgver=3.0.8
pkgrel=1
pkgdesc="A multiuser clone of the famous Microprose game of Civilization"
arch=('loong64' 'x86_64')
url="http://www.freeciv.org/"
license=('GPL')
depends=('gtk3' 'sdl_mixer' 'lua53' 'sqlite' 'curl')
makedepends=('python')
backup=('etc/freeciv/database.lua')
source=(https://downloads.sourceforge.net/sourceforge/${pkgname}/${pkgname}-${pkgver}.tar.xz)
sha512sums=('15253c428af1f6f688902c9df8f763ce8cad92345b1bdbe0f6444cbbb5c1d31fa27ff8b6f8ade30256931e1765a97293d8f8d82f7b4aadc22258218eb9ab428b')

build() {
  cd ${pkgname}-${pkgver}
  ./configure --prefix=/usr --sysconfdir=/etc --enable-shared --enable-sys-lua \
    --enable-client=gtk3 --enable-fcmp=gtk3 --enable-fcdb=sqlite3 --enable-aimodules
  make
}

package() {
  cd ${pkgname}-${pkgver}
  make DESTDIR="${pkgdir}" install
}
